package utils

import (
	"crypto/md5"
	"fmt"
)

func Md5(value string) string {
	data := []byte(value)
	has := md5.Sum(data)
	md5str1 := fmt.Sprintf("%x", has) //将[]byte转成16进制
	return md5str1
}

func Md5HasSalt(value string, salt string) string {
	return Md5(value + salt)
}
